package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 商家商品信息, tc_shop_good_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class ShopGood extends BaseEntity {
   
   //date formats
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**名称*/
   private java.lang.String name;
   /**现金价格*/
   private java.lang.String cashPrice;
   /**玫瑰价格*/
   private java.lang.String rosePrice;
   /**商家ID*/
   private java.lang.Integer shopId;
   /**商家名*/
   private java.lang.String shopName;   
   /**图片1*/
   private java.lang.String imageurl;
   /**图片2*/
   private java.lang.String picurl;
   /**概要*/
   private java.lang.String summary;
   /**介绍说明*/
   private java.lang.String explains;
   /**内容(备用)*/
   private java.lang.String content;
   
   private java.util.ArrayList idList;
   //columns END

	public ShopGood(){
	}

	public ShopGood(
		java.lang.Integer id
	){
		this.id = id;
	}

   public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.String getShopName() {
	return shopName;
	}
	
	public void setShopName(java.lang.String shopName) {
		this.shopName = shopName;
	}

	public java.lang.Integer getId() {
      return this.id;
   }
   public void setName(java.lang.String value) {
      this.name = value;
   }
   
   public java.lang.String getName() {
      return this.name;
   }
   public void setCashPrice(java.lang.String value) {
      this.cashPrice = value;
   }
   
   public java.lang.String getCashPrice() {
      return this.cashPrice;
   }
   public void setRosePrice(java.lang.String value) {
      this.rosePrice = value;
   }
   
   public java.lang.String getRosePrice() {
      return this.rosePrice;
   }
   public void setShopId(java.lang.Integer value) {
      this.shopId = value;
   }
   
   public java.lang.Integer getShopId() {
      return this.shopId;
   }
   public void setImageurl(java.lang.String value) {
      this.imageurl = value;
   }
   
   public java.lang.String getImageurl() {
      return this.imageurl;
   }
   public void setPicurl(java.lang.String value) {
      this.picurl = value;
   }
   
   public java.lang.String getPicurl() {
      return this.picurl;
   }
   public void setSummary(java.lang.String value) {
      this.summary = value;
   }
   
   public java.lang.String getSummary() {
      return this.summary;
   }
   public void setExplains(java.lang.String value) {
      this.explains = value;
   }
   
   public java.lang.String getExplains() {
      return this.explains;
   }
   public void setContent(java.lang.String value) {
      this.content = value;
   }
   
   public java.lang.String getContent() {
      return this.content;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("Name",getName())
         .append("CashPrice",getCashPrice())
         .append("RosePrice",getRosePrice())
         .append("ShopId",getShopId())
         .append("Imageurl",getImageurl())
         .append("Picurl",getPicurl())
         .append("Summary",getSummary())
         .append("Explains",getExplains())
         .append("Content",getContent())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getName())
         .append(getCashPrice())
         .append(getRosePrice())
         .append(getShopId())
         .append(getImageurl())
         .append(getPicurl())
         .append(getSummary())
         .append(getExplains())
         .append(getContent())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof ShopGood == false) return false;
      if(this == obj) return true;
      ShopGood other = (ShopGood)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getName(),other.getName())
         .append(getCashPrice(),other.getCashPrice())
         .append(getRosePrice(),other.getRosePrice())
         .append(getShopId(),other.getShopId())
         .append(getImageurl(),other.getImageurl())
         .append(getPicurl(),other.getPicurl())
         .append(getSummary(),other.getSummary())
         .append(getExplains(),other.getExplains())
         .append(getContent(),other.getContent())
         .isEquals();
   }
}

